<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib prefix="app" uri="http://www.wanrenhui.com"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <%@include file="../../res/include/base-head.jsp"%>
	<%@include file="../../res/include/jquery-easyui.jsp"%>
	<script type="text/javascript" src="${pageContext.request.contextPath}/res/js/community/communityAddr.js"></script>
	
</head>
<body>
	<div class="easyui-layout" data-options="fit:true">
		<div data-options="region:'west',title:'分类',split:true,tools:'#tree-toolbar'" style="width:250px;padding:5px;" oncontextmenu="return admin.communityAddr.showRootMenu(event);">
			<ul id="tree" data-options="url:'${pageContext.request.contextPath}/community/addr/addr/tree?communityId=${communityId }'"></ul>
		</div>
		<div data-options="region:'center'">
			<div id="tabs" class="easyui-tabs" data-options="fit:true,border:false,plain:false"></div>
		</div>
	</div>
	
	<!-- 树面板的工具栏 -->
	<div id="tree-toolbar">
		<a href="javascript:void(0);" class="icon-add" onclick="admin.communityAddr.bldgAdd(${communityId });" title="添加分类" group="leaf"></a>
		<a href="javascript:void(0);" class="icon-edit" onclick="admin.communityAddr.bldgUpdate();" title="修改分类" group="leaf"></a>
	</div>
	
	<!-- 在树节点上右键弹出的菜单 -->
	<div id="tree-menu" class="easyui-menu" style="width:120px;">
		<div onclick="admin.communityAddr.bldgAdd(${communityId });" data-options="iconCls:'icon-add'">添加</div>
		<div onclick="admin.communityAddr.bldgUpdate();" data-options="iconCls:'icon-edit'">修改</div>
		<div onclick="admin.communityAddr.bldgRemove(${id });" data-options="iconCls:'icon-remove'">删除</div>
	</div>
	
	<!-- 在空白处右键弹出的菜单 -->
	<div id="root-menu" class="easyui-menu" style="width:120px;">
		<div onclick="admin.communityAddr.addTop(${communityId },${parentId });" " data-options="iconCls:'icon-add'">添加一级分类</div>
	</div>
</body>
</html>
